GoLang

How to Install Go on Windows? | Go Programming Tutorial

How to Install Go on Windows? | Go Programming Tutorial

How to Install Go on Windows? | Go Programming Tutorial

In this tutorial, you will learn how to install the Go Programming Language in the Windows Operating System.

Before starting the process of installing Golang on our System. We should have first-hand knowledge of the Go Programming Language. Go is an open-source as well as statically typed programming language developed by Robert Griesemer, Rob Pike, and Ken Thompson at Google in 2009. It is also called Golang and it extends support to the procedural programming language. The main reason to introduce Golang is to improve the programming productivity of large codebases, multicore, and networked machines. Golang programs can be written on any plain text editor such as notepad, notepad++, or anything of that sort. The user can also use an online IDE for writing Golang codes and can also install it on their respective systems to make it more feasible to write these codes. Using a Golang IDE makes it easier to write these codes because IDEs have a lot of features like code editor, compiler, etc. 

How to check the Preinstalled Go Language Versions?

Before installing the Go language, it is good to check whether it is installed in your system. Search for cmd in the Run Dialog(windows +R). 

Now run the following command:

go version

If Golang is already installed, it will generate the message with all the details of the Golang’s version available, otherwise, if Golang is not installed in your system it will give an error which will arise stating Bad command or file name.

Downloading and Installing Go

Step 1: Download the Go for Windows from golang.org. Download the Golang according to your system architecture and follow the further instructions for the installation of Golang.

Step 2: After downloading the Goland, unzip the downloaded archive file. After unzipping you will get a folder named go in the current directory.

Step 3: Now copy and paste the extracted folder wherever you want to install the Go language. 

Step 4: Now set the environment variables. Right-click on My Pc and click on the properties. Choose the Advanced System Settings from the left side and select the environment variables.

Step 5: Click on the Path from the system variables and then click Edit. Now, click New and then add the path of the Golang folder. 

Step 6: Lastly, create a new user variable that tells the Go command where Golang libraries are available. Fill in the variable name as GOROOT and the variable values is the path of your Golang folder. Click ok on the Environment variables and the setup is completed. 

Now, check whether it is installed in your system or not by using the following command

go version

Yamini  Sharma

I am working as a professional engineer in "HIghRadius Technologies Pvt. Ltd." Passionate about learning and exploring new technologies. Enthusiast in writing and sharing what I have in my knowledge bucket.